USE [ConfigDB]
GO

ALTER TABLE [dbo].[tblConfigEntry] DROP CONSTRAINT [FK__tblConfig__Scope__1B0907CE]
GO

ALTER TABLE [dbo].[tblConfigEntry] DROP CONSTRAINT [FK__tblConfig__Entry__1A14E395]
GO

/****** Object:  Table [dbo].[tblConfigEntry]    Script Date: 17/07/2012 22:17:52 ******/
DROP TABLE [dbo].[tblConfigEntry]
GO

/****** Object:  Table [dbo].[tblConfigEntry]    Script Date: 17/07/2012 22:17:52 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[tblConfigEntry](
	[EntryId] [int] IDENTITY(1,1) NOT NULL,
	[EntryPathId] [int] NOT NULL,
	[ScopeId] [int] NOT NULL,
	[EntryName] [varchar](100) NOT NULL,
	[EntryType] [varchar](300) NOT NULL,
	[EntryValue] [varchar](8000) NOT NULL,
 CONSTRAINT [PK_tblConfigEntry] PRIMARY KEY CLUSTERED 
(
	[EntryId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

ALTER TABLE [dbo].[tblConfigEntry]  WITH CHECK ADD  CONSTRAINT [FK__tblConfig__Entry__1A14E395] FOREIGN KEY([EntryPathId])
REFERENCES [dbo].[tblConfigPath] ([PathId])
GO

ALTER TABLE [dbo].[tblConfigEntry] CHECK CONSTRAINT [FK__tblConfig__Entry__1A14E395]
GO

ALTER TABLE [dbo].[tblConfigEntry]  WITH CHECK ADD  CONSTRAINT [FK__tblConfig__Scope__1B0907CE] FOREIGN KEY([ScopeId])
REFERENCES [dbo].[tblScope] ([ScopeId])
GO

ALTER TABLE [dbo].[tblConfigEntry] CHECK CONSTRAINT [FK__tblConfig__Scope__1B0907CE]
GO

